package com.lx.principles.demo2.before;

/**
 * @ClassName Square
 * @Description: 正方形类
 * @Author: 落雪
 * @CreateDate: 2025/1/12 11:56
 * @UpdateUser: 落雪
 * @UpdateDate: 2025/1/12 11:56
 * @UpdateRemark:
 * @Version: 1.0
 */
public class Square extends  Rectangle {

    /*
    * @Author: 落雪
    * @Date: 2025/1/12 11:57
    * @Description: 设置正方形宽度
    * @param width
    * @Return:
    * @Version: 1.0.0
    */
    @Override
    public void setWidth(double width) {
        super.setWidth(width);
        super.setLength(width);
    }
    /**
    * @Author: 落雪
    * @Date: 2025/1/12 11:58
    * @Description: 设置正方形长度
    * @param length
    * @Return:
    * @Version: 1.0.0
    */
    @Override
    public void setLength(double length) {
        super.setLength(length);
        super.setWidth(length);
    }
}
